@IsTest
public class ContactTest{
    @IsTest
    static void testInsert(){
        // 新建客户数据
        Account account = new Account(Name = 'decai', CurrencyIsoCode='CNY');
        // 插入
        insert account;

        // 测试添加Phone不空
        Contact contact = new Contact(FirstName = 'tom',LastName = 'jury' , AccountId = account.Id, Phone = '18772939327', CurrencyIsoCode='CNY');
        insert contact;

        // 测试添加Phone为空
        contact = new Contact(FirstName = 'tom',LastName = 'jury' , AccountId = account.Id, CurrencyIsoCode='CNY');
        insert contact;
    }
}